/**
 *    $Id: TextOutput.java,v 1.1 2006/05/31 06:35:00 jfimagine Exp $
 *
 *    Copyright 2004 ~ 2005  JingFei International Cooperation LTD. All rights reserved. *
 */
package com.taillive.commons.io;


import java.io.PrintWriter;
import java.io.FileWriter;

/**
 * Text Output class.  A class used to output text strings;
 *
 * @author     CookieMaker
 *
 * @version $Revision: 1.1 $
 */
public class TextOutput {

    /**
     *   Write text content to a text file,replace existent content in the file.
     *
     *   @param fileName name of the text file.
     *   @param content content of the text file.
     */
    public static void writeTextFile(String fileName, String content) {
        try {
            PrintWriter out = new PrintWriter(new FileWriter(fileName));
            out.print(content);
            out.close();
        }
        catch (Exception e) {
            System.out.println("writeTextFile error: " + e.getMessage());
        }
    }


}
